<template>
	<view class="main wallet-main">
		<NavigationBar title="我的钱包" />
		<view class="scroll-wrap">
			<view class="card">
				<image class="card-bg" :src="BASE_IMG+'/cde7d060-075b-4782-8225-bdc4f8610d48.png'" mode="widthFix"></image>
				<view class="card-content">
					<view class="tips">钱包余额</view>
					<view class="count">88.00</view>
				</view>
			</view>
			<view class="cell-wrap">
				<view class="cell b-b" @click="clickCellAction(1)">
					<text class="iconfont cell-icon recharge-icon">&#xe648;</text>
					<text class="label">充值</text>
					<text class="iconfont arrow-right-icon">&#xe60a;</text>
				</view>
				<view class="cell b-b" @click="clickCellAction(2)">
					<text class="iconfont cell-icon withdrawal-icon">&#xe63e;</text>
					<text class="label">提现</text>
					<text class="iconfont arrow-right-icon">&#xe60a;</text>
				</view>
				<view class="cell b-b" @click="clickCellAction(3)">
					<text class="iconfont cell-icon record-icon">&#xe766;</text>
					<text class="label">资金记录</text>
					<text class="iconfont arrow-right-icon">&#xe60a;</text>
				</view>
			</view>
			<uni-popup type="dialog" ref="popup">
				<uni-popup-dialog type="sussess" title="通知" content="喵喵,我他妈的还没做呀" :before-close="true" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
			</uni-popup>
		</view>
	</view>
</template>

<script lang="ts">
	export default {
		data() {
			return {
				BASE_IMG: ''
			};
		},
		onLoad() {
			const _this:any = this
			_this.BASE_IMG = _this.$config.BASE_IMG
			console.log(_this.$config.BASE_IMG)
			
		},
		methods: {
			clickCellAction(type: any) {
				const _this:any = this
				if(type==1) {
					_this.$util.jumpPage('/pages/recharge/recharge')
					return
				}
				_this.$refs.popup.open()
			},
			dialogConfirm(done: any) {
				console.log('点击确认');
				// 需要执行 done 才能关闭对话框
				done()
			},
			dialogClose(done: any) {
				done()
			}
		}
	}
</script>

<style lang="scss">
	@import  './wallet.scss'
</style>
